GetStopwatchElapsedTime

Note: This statement is named Get Stopwatch Time in the Add Statement dialog box.

Returns the elapsed stopwatch time in HH:MM:SS.mm format. This statement is useful for providing elapsed time in text output. For example, you can print how long it took to complete a web page form and include the output text in the run report.

To control the stopwatch, use the StartStopwatch and StopStopwatch statements.

Syntax

GetStopwatchElapsedTime()

Return value

Value Description
Value Elapsed stopwatch time in HH:MM:SS.mm format.

Example

StartStopwatch()

Window("Report a Bug").EditBox("editboxUsername").SetText("Guest")

Window("Report a Bug").EditBox("editboxPassword").SetText("SoloBug")

Window("Report a Bug").Button("buttonLogin").Click()

StopStopwatch()

elapsedTime = GetStopwatchElapsedTime()

PrintLn("Login time: " + elapsedTime)